home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / dev / amos / AMOS0398.lzh / AMOSLIST / 000136_amos-request@svcs1.digex.net_Fri Mar 13 11:02:16 1998.msg < prev    next >
Text File  |  1998-04-01  |  3KB  |  93 lines

  1. >From amos-request@svcs1.digex.net  Fri Mar 13 11:02:16 1998
  2. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  3.     by pony-1.mail.digex.net (8.8.8/8.8.8) with ESMTP id LAA20665
  4.     for <mcox@access.digex.net>; Fri, 13 Mar 1998 11:02:16 -0500 (EST)
  5. Received: (from daemon@localhost)
  6.     by svcs1.digex.net (8.8.5/8.8.5) id JAA29300
  7.     for amos-out; Fri, 13 Mar 1998 09:28:44 -0500 (EST)
  8. Received: from pony-2.mail.digex.net (pony-2.mail.digex.net [204.91.241.6])
  9.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id JAA29297
  10.     for <amos-list@svcs1.digex.net>; Fri, 13 Mar 1998 09:28:43 -0500 (EST)
  11. Received: from sunny.bahnhof.se (sunny.bahnhof.se [193.44.91.1])
  12.     by pony-2.mail.digex.net (8.8.8/8.8.8) with ESMTP id JAA21991
  13.     for <amos-list@access.digex.net>; Fri, 13 Mar 1998 09:28:42 -0500 (EST)
  14. Received: from pm1-53.bahnhof.se (jonasth@pm1-53.bahnhof.se [193.44.91.117])
  15.     by sunny.bahnhof.se (8.8.8/8.8.8) with SMTP id PAA09873
  16.     for <amos-list@access.digex.net>; Fri, 13 Mar 1998 15:10:46 +0100 (MET)
  17. Date: 13 Mar 98 15:08:15 +0100
  18. From: "Jonas Thorell" <jonasth@bahnhof.se>
  19. Subject: Re: extension?
  20. To: "Garfield Benjamin" <amos-list@access.digex.net>
  21. In-Reply-To: <B0000232338@mailhost.sosbbs.com>
  22. Message-ID: <1907.376T767T9082936@bahnhof.se>
  23. MIME-Version: 1.0
  24. Content-type: text/plain; charset=us-ascii
  25. Content-transfer-encoding: 7bit
  26. X-System: Amiga 1200/030@50 Mhz, 34 Meg, 1.5 Gig HD, 28k8
  27. X-Software: Aweb, Miami, Thor
  28. X-Misc-info: Who's reading this??
  29. X-Mailer: THOR 2.5a (Amiga;TCP/IP)
  30. Status: O
  31. X-Status: 
  32.  
  33. Garfield Benjamin (gbenjam@sosbbs.com) wrote:
  34.  
  35. >> If AGE<10
  36. >>    Print "You are less than 10 years old."
  37. >> else if AGE=21
  38. >>    Print "Hey!! Now you can drink alcohol in the U.S.!!"
  39. >> else
  40. >>    Print "WOW, you're OVER 21!!"
  41. >> endif
  42. >> Smallest, and tidiest in my humble opinion.
  43. >> Is my approach good enough in the meantime?
  44.  
  45. >   Well, problem is this won't work. 
  46.  
  47. Yes it will. I tried it.
  48.  
  49. >First, you need to match every If with an End If and second, the logic is not 
  50. >the same.
  51.  
  52. Both. If and endif is coupled the same way as select ... case ... endselect
  53. is so I can't see the problem. The logic is the same too. Select..is just
  54. more advanced in that it offers some extra features.
  55.  
  56. >If AGE<10
  57. >   Print "You are less than 10 years old."
  58. >Else If AGE=21
  59. >      Print"Hey!! Now you can drink alcohol in the U.S.!!"
  60. >   Else If AGE>21
  61. >         Print "WOW, you'r OVER 21!!"
  62. >      End If
  63. >   End If
  64. >End If
  65.  
  66. That would trigger the error-system. One if and three end-ifs is plain
  67. wrong.
  68.  
  69. >   That being said, this might be a bit clearer (arguably the "best"
  70. >   method for AMOS) but it still lacks when compared to the
  71. >   Select...Case style.  Anyway, the point is you are still looking at
  72. >   the same two basic methods, the If...End If and the If...Else...EndIf
  73.  
  74. Yes but does it really matter? The result is what is importand and the
  75.  
  76. if...
  77.  
  78. else if ...
  79.  
  80. else
  81.  
  82. end if
  83.  
  84. structure is quite close to the select.. syntax.
  85.  
  86. ---
  87. Look at the shoes you're filling, look at the blood we're spilling
  88. Look at the world we're killing, the way we've always done before
  89. Look at the doubt we've wallowed, look at the leaders we've followed
  90. Look at the lies we've swallowed and I don't wanna hear no more
  91. ---
  92. Create the impression that you have already reached your level of incompetence.
  93.